package com.anyou.mall.goo.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import com.anyou.mall.sho.domain.CarPartsShopAudit;
import com.anyou.mall.sho.mapper.CarPartsShopAuditMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.goo.mapper.GooCouponShopMapper;
import com.anyou.mall.goo.domain.GooCouponShop;
import com.anyou.mall.goo.service.IGooCouponShopService;

/**
 * 优惠券与汽配商关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-06
 */
@Service
public class GooCouponShopServiceImpl extends ServiceImpl<GooCouponShopMapper, GooCouponShop> implements IGooCouponShopService
{
    @Autowired
    private GooCouponShopMapper gooCouponShopMapper;

    /**
     * 查询优惠券与汽配商关联
     * 
     * @param id 优惠券与汽配商关联主键
     * @return 优惠券与汽配商关联
     */
    @Override
    public GooCouponShop selectGooCouponShopById(Long id)
    {
        return gooCouponShopMapper.selectGooCouponShopById(id);
    }

    /**
     * 查询优惠券与汽配商关联列表
     * 
     * @param gooCouponShop 优惠券与汽配商关联
     * @return 优惠券与汽配商关联
     */
    @Override
    public List<GooCouponShop> selectGooCouponShopList(GooCouponShop gooCouponShop)
    {
        return gooCouponShopMapper.selectGooCouponShopList(gooCouponShop);
    }

    /**
     * 新增优惠券与汽配商关联
     * 
     * @param gooCouponShop 优惠券与汽配商关联
     * @return 结果
     */
    @Override
    public int insertGooCouponShop(GooCouponShop gooCouponShop)
    {
        gooCouponShop.setCreateTime(DateUtils.getNowDate());
        return gooCouponShopMapper.insertGooCouponShop(gooCouponShop);
    }

    /**
     * 修改优惠券与汽配商关联
     * 
     * @param gooCouponShop 优惠券与汽配商关联
     * @return 结果
     */
    @Override
    public int updateGooCouponShop(GooCouponShop gooCouponShop)
    {
        gooCouponShop.setUpdateTime(DateUtils.getNowDate());
        return gooCouponShopMapper.updateGooCouponShop(gooCouponShop);
    }

    /**
     * 批量删除优惠券与汽配商关联
     * 
     * @param ids 需要删除的优惠券与汽配商关联主键
     * @return 结果
     */
    @Override
    public int deleteGooCouponShopByIds(Long[] ids)
    {
        return gooCouponShopMapper.deleteGooCouponShopByIds(ids);
    }

    /**
     * 删除优惠券与汽配商关联信息
     * 
     * @param id 优惠券与汽配商关联主键
     * @return 结果
     */
    @Override
    public int deleteGooCouponShopById(Long id)
    {
        return gooCouponShopMapper.deleteGooCouponShopById(id);
    }
}
